package ltd.jdsoft.cute.prometheus.spi;

import org.aspectj.lang.ProceedingJoinPoint;

import ltd.jdsoft.cute.common.extention.SPI;
import ltd.jdsoft.cute.prometheus.MonitorChain;

/**
 * prometheus的监控扩展节点，后续有新增监控项，继承该接口即可自动增加该监控项
 * 
 * @author zhengzhq
 *
 */
@SPI
public interface Monitor {

  static final double[] DEFAULT_BUCKETS = {0.05, 0.1, 0.2, 0.5, 1, 2, 3};
  static final String[] LABEL_NAMES = {"class_name", "method_name"};

  Object process(ProceedingJoinPoint joinPoint, MonitorChain chain, String... labelValues)
      throws Throwable;
}
